\pard\tx533\tx1067\tx1601\tx2135\tx2668\tx3202\tx3736\tx4270\tx4803\tx5337\fc0 pop-up list
\pard\tx340\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-340\li340 by dragging it from the InterfaceBuilder palette into a window, but it doesn't seem to be freed when the window is freed. \
\pard\tx340\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-340\li340 ! It's attached as the target of a Button. There are two situations in which this bug can bite an unwary programmer:\
\
1) An application creates multiple document windows by loading a nib section multiple times. In the nib section, there's a
\pard\tx340\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-340\li340 , and there are pointers to the missing
\fc0 pop-up list
s in [NXApp windowList].\
\
2) Same situation as in (1), except that each time, the nib section is loaded into a unique zone, and the zones are destroyed when the documents are closed. Destroying the zone gets rid of all the garbage, but now there are bad pointers in [NXApp windowList]. Some time later, the application crashes in code that you didn't write, referencing objects that you don't know about, leaving you very confused.\
\
The solution is to free the
pop-up list
when you free the
window
. When setting up the nib file, make an outlet to the Button. In your code, use the outlet to ask the Button for its target before you free the